<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <script>
    function getSum(a, b) {
      console.log(a + b);
    }

    getSum(1, 2)

    // 参数默认值
    function getSum1(a = 0, b = 0) {
      console.log(a + b);
    }

    getSum1()
  </script>
</body>

</html>